﻿@{
    ViewBag.Title = "Index";
}
<script src="~/Content/js/Hselect.js"></script>
@this.Partial("Size_js")
<div style="max-width:100%;">
    <div class="topPanel">
        <div class="toolbar">
            <a class="a-btn-refresh" onclick="$ace.reload()"></a>
            <button class="a-btn-edit" data-bind="click:edit,disable:!dataTable.selectedModel()">修改</button>
            <button class="a-btn-add" data-bind="click:add">添加</button>
            <button class="a-btn-add" data-bind="click:batchAdd">数据导入</button>
            <button class="a-btn-delete" data-bind="click:del,disable:!dataTable.selectedModel()">删除</button>
        </div>
        <div class="search">
            <table class="form-table" style="width:400px;">
                <tr>
                    <td>
                        <input type="text" class="a-control" placeholder="请输入要查询关键字" style="width: 200px;" data-bind="value:searchModel().keyword">
                    </td>
                    <td>
                        <button type="button" class="a-btn-search" data-bind="click:search"></button>
                    </td>
                </tr>
            </table>
        </div>
    </div>


    <div>
        <table class="table table-hover" data-bind="with:dataTable">
            <thead>
                <tr>
                    <th style="width:20px;"></th>
                    <th>产品编号</th>
                    <th>产品规格</th>
                    <th>成本价</th>
                    <th>批发价</th>
                    <th>零售价</th>
                
                </tr>
            </thead>
            <tbody data-bind="foreach:models">
                <tr data-bind="click:$parent.selectRow">
                    <td data-bind="text:$parent.getOrdinal($index())"></td>
                    <td data-bind="text:ProductCode"></td>
                    <td data-bind="text:ProSize"></td>

                    <td data-bind="text:BasePrice"></td>
                    <td data-bind="text:BatchPrice"></td>

                    <td data-bind="text:Price"></td>
                    
                </tr>
            </tbody>
        </table>
    </div>
</div>
<dialogbox data-bind="with:dialog">
    <form id="form1">
        <table class="form-table">
            <tr>
                <td class="form-title">产品编号</td>
                <td class="form-value">
                    <input name="ProductCode" disabled id="ProductCode" type="text" class="a-control required" placeholder="请输入产品编号" data-bind="value:model().ProductCode" />
                </td>
            </tr>
            <tr>
                <td class="form-title">产品规格</td>
                <td class="form-value">
                    <input name="ProSize" id="ProSize" type="text" class="a-control required" placeholder="请输入产品名称" data-bind="value:model().ProSize" />
                </td>
            </tr>




            <tr>
                <td class="form-title">成本价</td>
                <td class="form-value">
                    <input name="BasePrice" id="BasePrice" type="text" class="a-control required" placeholder="请输入成本价" data-bind="value:model().BasePrice" />
                </td>
            </tr>

            <tr>
                <td class="form-title">批发价</td>
                <td class="form-value">
                    <input name="BatchPrice" id="BatchPrice" type="text" class="a-control required" placeholder="请输入批发价" data-bind="value:model().BatchPrice" />
                </td>
            </tr>

            <tr>
                <td class="form-title">零售价</td>
                <td class="form-value">
                    <input name="Price" id="Price" type="text" class="a-control required" placeholder="请输入零售价" data-bind="value:model().Price" />
                </td>
            </tr>
             


        </table>
    </form>
</dialogbox>
